<template>
  <div class="configBox">
    <div class="itemBox">
      <div class="leftLabel">语音包发送档位设置:</div>
      <div class="rightContent">
        <a-radio-group class="radioGroup" v-model="sendingGear" @change="onChange">
          <a-row>
            <a-radio-button value="30">每秒发出30顿</a-radio-button>
            <a-radio-button value="100">每秒发出100顿</a-radio-button>
          </a-row>
          <a-row>
            <a-radio-button value="200">每秒发出200顿</a-radio-button>
            <a-radio-button value="300">每秒发出300顿</a-radio-button>
          </a-row>
        </a-radio-group>
      </div>
    </div>
    <div class="itemBox">
      <div class="leftLabel">获取音频文件位置:</div>
      <div class="rightContent">
        <div class="inputFile">
          <a-input type="file" />
        </div>
      </div>
    </div>
    <div class="itemBox">
      <div class="leftLabel">外部提供音频文件接口:</div>
      <div class="rightContent">
        <a-textarea placeholder="REST接口" :rows="6" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      sendingGear: "30",
    }
  },
  methods: {
    onChange(a, v) {
      console.log(a, v)
    },

    toggleClass(index, item) {
      //点击哪个，哪个亮。请求该导弹的数据 并且更新界面
      let nodelist = document.getElementsByClassName('ballBox')
      // console.log(nodelist, '节点.classList.remove("类名")')
      let arr = [...nodelist];
      arr.forEach(element => {
        if (element.classList.contains('blueBox')) {
          // console.log('包含 test 这个class');
          element.classList.remove("blueBox")
        }
      });
      console.log(item, 'item')

      if (index) {
        arr[index - 1].classList.add("blueBox")
      }
      this.activeKey = index


    },
  }

}
</script>

<style lang="less" scoped>
// html,
// body {
//   height: 100%;
// }
.configBox {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding-top: 50px;
  // border: 1px solid red;
}
.itemBox {
  // margin: auto;
  margin: 30px;
  width: 85%;
  border: 1px dashed #26fbf3;
  display: flex;
  justify-content: space-around;
  padding: 25px;
  .leftLabel {
    width: 35%;
    line-height: 140px;
    height: 140px;
    margin: 10px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    // line-height: calc(100% - 20px);
    // height: calc(100% - 20px);
    border: 1px solid #26fbf3;
  }
  .rightContent {
    width: 45%;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    .radioGroup {
      width: 100%;
      display: flex;
      justify-content: space-between;
      .ant-row {
        width: 100%;
        justify-content: space-between;
      }

      .ant-radio-button-wrapper {
        width: 200px;
        height: 60px;
        margin: 5px;
        line-height: 60px;
        text-align: center;
        border-radius: 0px;
        background: transparent;
        color: #fff;
      }
      .ant-radio-button-wrapper-checked {
        color: rgb(76, 228, 248);
        border: 1px solid #26fbf3;
        background: url('~@/assets/img/C/ASIC带点背景.png') no-repeat;
        background-size: 100% 100%;
      }
    }
  }
}
</style>
<style >
.blueBox {
  color: rgb(76, 228, 248);
  border: 1px solid #26fbf3;
}
input[type='file'] {
  appearance: none;
  background-color: transparent;
  border: none;
  color: white;
  font-size: 16px;
  /* padding: 12px 14px; */
  text-align: center;
}
.inputFile {
  width: 100%;
  height: 140px;
  border: 1px solid #26fbf3;
}
::file-selector-button {
  /* height: 3rem; */
  /* font-size: 18px;
  padding: 10px; */
  background-color: transparent;
  color: #fff;
  border: 1px solid aqua;
  /* border-radius: 20px;
  box-sizing: border-box; */
}
/* .ASIC {
} */
</style>